package com.example.demo.study.studentmanagement2;
// 学生工厂类
public class StudentFactory {

    public static Stundent createStudent(String type,String name,String studentId, int age, String className) {
        switch (type){

//            case "本科生":
//                return new UndergraduateStudent(name,studentId,age,className);
//            case "研究生":
//                return new GraduateStudent(name,studentId,age,className);
//            case "交换生":
//                return new ExchangeStudent(name,studentId,age,className);
//            default:
//                throw new IllegalArgumentException("未知学生类型: " + type);
        }


        return null;

    }
}
